import { useEffect, useState } from "react";
import styles from "./index.module.scss";
import { getUserDeatil } from "@/api/user/index";
import { useNavigate, useParams } from "react-router-dom";

const User = () => {
  // const navigate = useNavigate();
  const { id } = useParams();
  const [userInfo, setUserInfo] = useState({
    nickname: "",
    userId: "",
    avatarUrl: "",
  });
  useEffect(() => {
    return () => {
      getUserDeatil(id).then((result) => {
        console.log(result);
        // setUserInfo(result);
      });
    };
  }, []);
  return (
    <div className={styles.User}>
      <div className={styles.userHeaer}>123</div>
      <div className={styles.userContent}>456</div>
    </div>
  );
};

export default User;
